<%@ page language="java"  pageEncoding="utf-8"%>
<%@ page import="com.XiGuaXiaoMe.dao.courseDao" %>
<%@ page import="com.XiGuaXiaoMe.entity.course" %>
<%@ page import="java.util.List" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
	<title>学生选课信息管理系统-课程信息</title>
	  <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>http://www.jq22.com/jquery/font-awesome.4.6.0.css">
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/CSS/css/jquery.paginate.css" />
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/CSS/css/jquery.yhhDataTable.css" />
	  <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
	  <script type="text/javascript" src="${pageContext.request.contextPath}/JS/js/jquery.paginate.js" ></script>
	  <script type="text/javascript" src="${pageContext.request.contextPath}/JS/js/jquery.yhhDataTable.js" ></script>
	  <script type="text/javascript" src="${pageContext.request.contextPath}/JS/js/index.js" ></script>
	  <link rel="stylesheet" href="${pageContext.request.contextPath}/CSS/toPage.css">

	  <link rel="stylesheet" href="${pageContext.request.contextPath}/font_cqbiizu5og9/iconfont.css">
	  <title>自适应导航栏</title>
	  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/导航栏c.css" />

	  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/table.css" />
	  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/mainpage.css" />

	  <link href="<%= request.getContextPath()%>https://fonts.googleapis.com/css?family=Roboto+Condensed:300,300i,400,400i,700i" rel="stylesheet">


	  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/CSS/ style_1.css" />


  </head>
  <body>
  <iframe class="obj1" src="${pageContext.request.contextPath}/Student/head.html" frameborder="0" width="1300px" height="90px" scrolling="no"></iframe>

<div class="shell" style=" background-color: #bb3e03;">
	<a href="${pageContext.request.contextPath}/Teacher/userinformation.jsp" class="box" style="color: #faedcd;" ><i class="iconfont icon-liebiao"></i><span>个人信息</span></a>
	<a href="<%= request.getContextPath()%>/Teacher/selectCou.jsp" class="box" style="color: #faedcd;"><i class="iconfont icon-cangku"></i><span>课程管理</span></a>
	<a href="/MyWeb/Teacher/classes.jsp" class="box"style="color: #faedcd;"><i class="iconfont icon-zhuti_tiaosepan"></i><span>学生成绩管理</span></a>
	<a href="#" class="box"style="color: #faedcd;"><i class="iconfont icon-qianbao"></i><span>已选课程</span></a>

	<a href="<%= request.getContextPath()%>/Student/日历3.html" class="box" style="color: #faedcd;"><i class="iconfont icon-dunpaibaoxianrenzheng"></i><span>日历</span></a>
	<a href="#" class="box"style="color: #faedcd;"><i class="iconfont icon-dengchu"></i><span>退出系统</span></a>
</div>

		<div class="box1">
			<%
    		courseDao select = new courseDao();
			List<course> list = select.findAll(); %>
			<td><input class="btn" type="button" value="添加课程" onclick="window.location.href=('/MyWeb/Teacher/InsertCou.jsp')"/></td>

			<div class="container">
				<table id="testtable1">
  					<tr><td></td></tr>
  					<tr>
  						<td>课程编号</td><td>课程名称</td>
						<td>课序号</td>
						<td>课程教师</td>
						<td>上课时间及地点</td>
						<td>课容量</td>
						<td>修改课程</td><td>删除课程</td>
  						
  					</tr>
					<%for(course c:list){ %>

					<tr>
						<td><%=c.getId()%></td>
						<td><%=c.getName()%></td>
						<td><%=c.getXuhao()%></td>
						<td><%=c.getTeacher()%></td>
						<td><%=c.getTime()%><%=c.getPlace()%></td>
						<td><%=c.getRongliang()%></td>


  					<td><input  class="btn" type="button" value="修改课程"
								onClick="window.location.href=('/MyWeb/Teacher/updateCou.jsp?xuhao=<%= c.getXuhao() %>')"></td>
  					<td><input  class="btn" type="button" value="删除课程"
								onClick="window.location.href=('/MyWeb/Teacher/serDeleteCou?xuhao=<%= c.getXuhao() %>')"></td>
  					</tr>
		  				<%
		   		}
		    %>
  				</table>
				
			</div>
		</div>

</div>
</body>
</html>
